package com.r2coding.auth.exception;

import lombok.Getter;

/**
 * 错误码枚举类
 *
 * @author:98k灬
 * @since:2022/02/22 23:26
 **/
@Getter
public enum BizCode {
    UNKNOW_EXCEPTION(10000, "系统未知异常"),
    VALID_EXCEPTION(10001, "参数格式校验失败"),
    SMS_CODE_EXCEPTION(10002, "验证码获取频率太高，稍后再试"),
    PRODUCT_UP_EXCEPTION(11000, "商品上架异常"),
    USER_EXIST_EXCEPTION(15001, "用户存在"),
    PHONE_EXIST_EXCEPTION(15002, "手机号存在"),
    SERVICE_EXCEPTION(15003, "业务异常"),
    CATEGORY_OCCUPY(15004, "分类被占用"),
    PHONE_CODE_ERROR(15005, "短信验证码校验失败"),
    PHONE_CODE_EMPTY(15009, "短信验证码为空"),
    UPLOAD_ERROR(15006, "文件上传失败"),
    FILE_EMPTY(15007, "文件为空"),
    SINGER_INFO_EMPTY(15008, "上传的文件中歌手信息不存在"),
    ;

    private final int code;
    private final String msg;

    BizCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
